package router

import (
	"github.com/gin-gonic/gin"
	"mxshop_api/order_web/api/cart"
	"mxshop_api/order_web/middlewares"
)

func CartRouter(group *gin.RouterGroup) {
	CartRouter := group.Group("shopcarts").Use(middlewares.JWTAuth())
	{
		CartRouter.GET("", cart.List)
		CartRouter.POST("", cart.New)
		CartRouter.PATCH("/:id", cart.Update)
		CartRouter.DELETE("/:id", cart.Delete)
	}
}
